﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WF.DAL;
using System.Data.SqlTypes;

namespace WF.Model
{
    public class EmployeePositionRoleEntity : EntityBase<EmployeePositionRole>
    {
        #region 构造函数

        public EmployeePositionRoleEntity()
            : base()
        {
        }

        public EmployeePositionRoleEntity(EmployeePositionRole EmployeePositionRole)
            : base(EmployeePositionRole)
        { }
        #endregion

        #region 实现基类abstract属性


        public override string ID
        {
            get
            {
                return DbEntity.RowID;
            }
            set
            {
                DbEntity.RowID = value; this.SendPropertyChanged("RowID");
            }
        }

        public override string DisplayName
        {
            get { return DbEntity.RowID; }
            //set { DbEntity.FullName = value; }
        }
        #endregion

        #region Public 属性

        public string EmpID
        {
            get { return DbEntity.EmpID; }
            set { DbEntity.EmpID = value; this.SendPropertyChanged("EmpID"); }
        }

        public string PositionID
        {
            get { return DbEntity.PositionID; }
            set { DbEntity.PositionID = value; this.SendPropertyChanged("PositionID"); }
        }

        public short FlagPrimary
        {
            get { return DbEntity.FlagPrimary; }
            set { DbEntity.FlagPrimary = value; this.SendPropertyChanged("FlagPrimary"); }
        }

        public System.Nullable<System.DateTime> ModDate
        {
            get { return DbEntity.ModDate; }
            set
            {
                DbEntity.ModDate = DateTime.MinValue == value ? null : value;
                this.SendPropertyChanged("ModDate");
            }
        }
        #endregion
    }
}
